/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/**
 * Autogenerated by Thrift Compiler (0.11.0)
 *
 * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *
 * @generated
 */
package org.apache.pegasus.apps;

import org.apache.pegasus.base.blob;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(
    value = "Autogenerated by Thrift Compiler (0.11.0)",
    date = "2022-03-10")
public class rrdb {

  public interface Iface {

    public update_response put(update_request update) throws org.apache.thrift.TException;

    public update_response multi_put(multi_put_request request) throws org.apache.thrift.TException;

    public update_response remove(blob key) throws org.apache.thrift.TException;

    public multi_remove_response multi_remove(multi_remove_request request)
        throws org.apache.thrift.TException;

    public incr_response incr(incr_request request) throws org.apache.thrift.TException;

    public check_and_set_response check_and_set(check_and_set_request request)
        throws org.apache.thrift.TException;

    public check_and_mutate_response check_and_mutate(check_and_mutate_request request)
        throws org.apache.thrift.TException;

    public read_response get(blob key) throws org.apache.thrift.TException;

    public multi_get_response multi_get(multi_get_request request)
        throws org.apache.thrift.TException;

    public batch_get_response batch_get(batch_get_request request)
        throws org.apache.thrift.TException;

    public count_response sortkey_count(blob hash_key) throws org.apache.thrift.TException;

    public ttl_response ttl(blob key) throws org.apache.thrift.TException;

    public scan_response get_scanner(get_scanner_request request)
        throws org.apache.thrift.TException;

    public scan_response scan(scan_request request) throws org.apache.thrift.TException;

    public void clear_scanner(long context_id) throws org.apache.thrift.TException;
  }

  public interface AsyncIface {

    public void put(
        update_request update,
        org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException;

    public void multi_put(
        multi_put_request request,
        org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException;

    public void remove(
        blob key, org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException;

    public void multi_remove(
        multi_remove_request request,
        org.apache.thrift.async.AsyncMethodCallback<multi_remove_response> resultHandler)
        throws org.apache.thrift.TException;

    public void incr(
        incr_request request,
        org.apache.thrift.async.AsyncMethodCallback<incr_response> resultHandler)
        throws org.apache.thrift.TException;

    public void check_and_set(
        check_and_set_request request,
        org.apache.thrift.async.AsyncMethodCallback<check_and_set_response> resultHandler)
        throws org.apache.thrift.TException;

    public void check_and_mutate(
        check_and_mutate_request request,
        org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response> resultHandler)
        throws org.apache.thrift.TException;

    public void get(
        blob key, org.apache.thrift.async.AsyncMethodCallback<read_response> resultHandler)
        throws org.apache.thrift.TException;

    public void multi_get(
        multi_get_request request,
        org.apache.thrift.async.AsyncMethodCallback<multi_get_response> resultHandler)
        throws org.apache.thrift.TException;

    public void batch_get(
        batch_get_request request,
        org.apache.thrift.async.AsyncMethodCallback<batch_get_response> resultHandler)
        throws org.apache.thrift.TException;

    public void sortkey_count(
        blob hash_key, org.apache.thrift.async.AsyncMethodCallback<count_response> resultHandler)
        throws org.apache.thrift.TException;

    public void ttl(
        blob key, org.apache.thrift.async.AsyncMethodCallback<ttl_response> resultHandler)
        throws org.apache.thrift.TException;

    public void get_scanner(
        get_scanner_request request,
        org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
        throws org.apache.thrift.TException;

    public void scan(
        scan_request request,
        org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
        throws org.apache.thrift.TException;

    public void clear_scanner(
        long context_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
        throws org.apache.thrift.TException;
  }

  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}

      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }

      public Client getClient(
          org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot) {
      super(prot, prot);
    }

    public Client(
        org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public update_response put(update_request update) throws org.apache.thrift.TException {
      send_put(update);
      return recv_put();
    }

    public void send_put(update_request update) throws org.apache.thrift.TException {
      put_args args = new put_args();
      args.setUpdate(update);
      sendBase("put", args);
    }

    public update_response recv_put() throws org.apache.thrift.TException {
      put_result result = new put_result();
      receiveBase(result, "put");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "put failed: unknown result");
    }

    public update_response multi_put(multi_put_request request)
        throws org.apache.thrift.TException {
      send_multi_put(request);
      return recv_multi_put();
    }

    public void send_multi_put(multi_put_request request) throws org.apache.thrift.TException {
      multi_put_args args = new multi_put_args();
      args.setRequest(request);
      sendBase("multi_put", args);
    }

    public update_response recv_multi_put() throws org.apache.thrift.TException {
      multi_put_result result = new multi_put_result();
      receiveBase(result, "multi_put");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "multi_put failed: unknown result");
    }

    public update_response remove(blob key) throws org.apache.thrift.TException {
      send_remove(key);
      return recv_remove();
    }

    public void send_remove(blob key) throws org.apache.thrift.TException {
      remove_args args = new remove_args();
      args.setKey(key);
      sendBase("remove", args);
    }

    public update_response recv_remove() throws org.apache.thrift.TException {
      remove_result result = new remove_result();
      receiveBase(result, "remove");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "remove failed: unknown result");
    }

    public multi_remove_response multi_remove(multi_remove_request request)
        throws org.apache.thrift.TException {
      send_multi_remove(request);
      return recv_multi_remove();
    }

    public void send_multi_remove(multi_remove_request request)
        throws org.apache.thrift.TException {
      multi_remove_args args = new multi_remove_args();
      args.setRequest(request);
      sendBase("multi_remove", args);
    }

    public multi_remove_response recv_multi_remove() throws org.apache.thrift.TException {
      multi_remove_result result = new multi_remove_result();
      receiveBase(result, "multi_remove");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "multi_remove failed: unknown result");
    }

    public incr_response incr(incr_request request) throws org.apache.thrift.TException {
      send_incr(request);
      return recv_incr();
    }

    public void send_incr(incr_request request) throws org.apache.thrift.TException {
      incr_args args = new incr_args();
      args.setRequest(request);
      sendBase("incr", args);
    }

    public incr_response recv_incr() throws org.apache.thrift.TException {
      incr_result result = new incr_result();
      receiveBase(result, "incr");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "incr failed: unknown result");
    }

    public check_and_set_response check_and_set(check_and_set_request request)
        throws org.apache.thrift.TException {
      send_check_and_set(request);
      return recv_check_and_set();
    }

    public void send_check_and_set(check_and_set_request request)
        throws org.apache.thrift.TException {
      check_and_set_args args = new check_and_set_args();
      args.setRequest(request);
      sendBase("check_and_set", args);
    }

    public check_and_set_response recv_check_and_set() throws org.apache.thrift.TException {
      check_and_set_result result = new check_and_set_result();
      receiveBase(result, "check_and_set");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "check_and_set failed: unknown result");
    }

    public check_and_mutate_response check_and_mutate(check_and_mutate_request request)
        throws org.apache.thrift.TException {
      send_check_and_mutate(request);
      return recv_check_and_mutate();
    }

    public void send_check_and_mutate(check_and_mutate_request request)
        throws org.apache.thrift.TException {
      check_and_mutate_args args = new check_and_mutate_args();
      args.setRequest(request);
      sendBase("check_and_mutate", args);
    }

    public check_and_mutate_response recv_check_and_mutate() throws org.apache.thrift.TException {
      check_and_mutate_result result = new check_and_mutate_result();
      receiveBase(result, "check_and_mutate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "check_and_mutate failed: unknown result");
    }

    public read_response get(blob key) throws org.apache.thrift.TException {
      send_get(key);
      return recv_get();
    }

    public void send_get(blob key) throws org.apache.thrift.TException {
      get_args args = new get_args();
      args.setKey(key);
      sendBase("get", args);
    }

    public read_response recv_get() throws org.apache.thrift.TException {
      get_result result = new get_result();
      receiveBase(result, "get");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result");
    }

    public multi_get_response multi_get(multi_get_request request)
        throws org.apache.thrift.TException {
      send_multi_get(request);
      return recv_multi_get();
    }

    public void send_multi_get(multi_get_request request) throws org.apache.thrift.TException {
      multi_get_args args = new multi_get_args();
      args.setRequest(request);
      sendBase("multi_get", args);
    }

    public multi_get_response recv_multi_get() throws org.apache.thrift.TException {
      multi_get_result result = new multi_get_result();
      receiveBase(result, "multi_get");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "multi_get failed: unknown result");
    }

    public batch_get_response batch_get(batch_get_request request)
        throws org.apache.thrift.TException {
      send_batch_get(request);
      return recv_batch_get();
    }

    public void send_batch_get(batch_get_request request) throws org.apache.thrift.TException {
      batch_get_args args = new batch_get_args();
      args.setRequest(request);
      sendBase("batch_get", args);
    }

    public batch_get_response recv_batch_get() throws org.apache.thrift.TException {
      batch_get_result result = new batch_get_result();
      receiveBase(result, "batch_get");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "batch_get failed: unknown result");
    }

    public count_response sortkey_count(blob hash_key) throws org.apache.thrift.TException {
      send_sortkey_count(hash_key);
      return recv_sortkey_count();
    }

    public void send_sortkey_count(blob hash_key) throws org.apache.thrift.TException {
      sortkey_count_args args = new sortkey_count_args();
      args.setHash_key(hash_key);
      sendBase("sortkey_count", args);
    }

    public count_response recv_sortkey_count() throws org.apache.thrift.TException {
      sortkey_count_result result = new sortkey_count_result();
      receiveBase(result, "sortkey_count");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "sortkey_count failed: unknown result");
    }

    public ttl_response ttl(blob key) throws org.apache.thrift.TException {
      send_ttl(key);
      return recv_ttl();
    }

    public void send_ttl(blob key) throws org.apache.thrift.TException {
      ttl_args args = new ttl_args();
      args.setKey(key);
      sendBase("ttl", args);
    }

    public ttl_response recv_ttl() throws org.apache.thrift.TException {
      ttl_result result = new ttl_result();
      receiveBase(result, "ttl");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "ttl failed: unknown result");
    }

    public scan_response get_scanner(get_scanner_request request)
        throws org.apache.thrift.TException {
      send_get_scanner(request);
      return recv_get_scanner();
    }

    public void send_get_scanner(get_scanner_request request) throws org.apache.thrift.TException {
      get_scanner_args args = new get_scanner_args();
      args.setRequest(request);
      sendBase("get_scanner", args);
    }

    public scan_response recv_get_scanner() throws org.apache.thrift.TException {
      get_scanner_result result = new get_scanner_result();
      receiveBase(result, "get_scanner");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT,
          "get_scanner failed: unknown result");
    }

    public scan_response scan(scan_request request) throws org.apache.thrift.TException {
      send_scan(request);
      return recv_scan();
    }

    public void send_scan(scan_request request) throws org.apache.thrift.TException {
      scan_args args = new scan_args();
      args.setRequest(request);
      sendBase("scan", args);
    }

    public scan_response recv_scan() throws org.apache.thrift.TException {
      scan_result result = new scan_result();
      receiveBase(result, "scan");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(
          org.apache.thrift.TApplicationException.MISSING_RESULT, "scan failed: unknown result");
    }

    public void clear_scanner(long context_id) throws org.apache.thrift.TException {
      send_clear_scanner(context_id);
    }

    public void send_clear_scanner(long context_id) throws org.apache.thrift.TException {
      clear_scanner_args args = new clear_scanner_args();
      args.setContext_id(context_id);
      sendBaseOneway("clear_scanner", args);
    }
  }

  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
      implements AsyncIface {
    public static class Factory
        implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;

      public Factory(
          org.apache.thrift.async.TAsyncClientManager clientManager,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }

      public AsyncClient getAsyncClient(
          org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(
        org.apache.thrift.protocol.TProtocolFactory protocolFactory,
        org.apache.thrift.async.TAsyncClientManager clientManager,
        org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void put(
        update_request update,
        org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      put_call method_call =
          new put_call(update, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class put_call extends org.apache.thrift.async.TAsyncMethodCall<update_response> {
      private update_request update;

      public put_call(
          update_request update,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.update = update;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "put", org.apache.thrift.protocol.TMessageType.CALL, 0));
        put_args args = new put_args();
        args.setUpdate(update);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public update_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_put();
      }
    }

    public void multi_put(
        multi_put_request request,
        org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      multi_put_call method_call =
          new multi_put_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class multi_put_call
        extends org.apache.thrift.async.TAsyncMethodCall<update_response> {
      private multi_put_request request;

      public multi_put_call(
          multi_put_request request,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "multi_put", org.apache.thrift.protocol.TMessageType.CALL, 0));
        multi_put_args args = new multi_put_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public update_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_multi_put();
      }
    }

    public void remove(
        blob key, org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      remove_call method_call =
          new remove_call(key, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class remove_call
        extends org.apache.thrift.async.TAsyncMethodCall<update_response> {
      private blob key;

      public remove_call(
          blob key,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.key = key;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "remove", org.apache.thrift.protocol.TMessageType.CALL, 0));
        remove_args args = new remove_args();
        args.setKey(key);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public update_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_remove();
      }
    }

    public void multi_remove(
        multi_remove_request request,
        org.apache.thrift.async.AsyncMethodCallback<multi_remove_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      multi_remove_call method_call =
          new multi_remove_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class multi_remove_call
        extends org.apache.thrift.async.TAsyncMethodCall<multi_remove_response> {
      private multi_remove_request request;

      public multi_remove_call(
          multi_remove_request request,
          org.apache.thrift.async.AsyncMethodCallback<multi_remove_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "multi_remove", org.apache.thrift.protocol.TMessageType.CALL, 0));
        multi_remove_args args = new multi_remove_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public multi_remove_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_multi_remove();
      }
    }

    public void incr(
        incr_request request,
        org.apache.thrift.async.AsyncMethodCallback<incr_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      incr_call method_call =
          new incr_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class incr_call extends org.apache.thrift.async.TAsyncMethodCall<incr_response> {
      private incr_request request;

      public incr_call(
          incr_request request,
          org.apache.thrift.async.AsyncMethodCallback<incr_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "incr", org.apache.thrift.protocol.TMessageType.CALL, 0));
        incr_args args = new incr_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public incr_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_incr();
      }
    }

    public void check_and_set(
        check_and_set_request request,
        org.apache.thrift.async.AsyncMethodCallback<check_and_set_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      check_and_set_call method_call =
          new check_and_set_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class check_and_set_call
        extends org.apache.thrift.async.TAsyncMethodCall<check_and_set_response> {
      private check_and_set_request request;

      public check_and_set_call(
          check_and_set_request request,
          org.apache.thrift.async.AsyncMethodCallback<check_and_set_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "check_and_set", org.apache.thrift.protocol.TMessageType.CALL, 0));
        check_and_set_args args = new check_and_set_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public check_and_set_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_check_and_set();
      }
    }

    public void check_and_mutate(
        check_and_mutate_request request,
        org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      check_and_mutate_call method_call =
          new check_and_mutate_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class check_and_mutate_call
        extends org.apache.thrift.async.TAsyncMethodCall<check_and_mutate_response> {
      private check_and_mutate_request request;

      public check_and_mutate_call(
          check_and_mutate_request request,
          org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "check_and_mutate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        check_and_mutate_args args = new check_and_mutate_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public check_and_mutate_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_check_and_mutate();
      }
    }

    public void get(
        blob key, org.apache.thrift.async.AsyncMethodCallback<read_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      get_call method_call =
          new get_call(key, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get_call extends org.apache.thrift.async.TAsyncMethodCall<read_response> {
      private blob key;

      public get_call(
          blob key,
          org.apache.thrift.async.AsyncMethodCallback<read_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.key = key;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "get", org.apache.thrift.protocol.TMessageType.CALL, 0));
        get_args args = new get_args();
        args.setKey(key);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public read_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_get();
      }
    }

    public void multi_get(
        multi_get_request request,
        org.apache.thrift.async.AsyncMethodCallback<multi_get_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      multi_get_call method_call =
          new multi_get_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class multi_get_call
        extends org.apache.thrift.async.TAsyncMethodCall<multi_get_response> {
      private multi_get_request request;

      public multi_get_call(
          multi_get_request request,
          org.apache.thrift.async.AsyncMethodCallback<multi_get_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "multi_get", org.apache.thrift.protocol.TMessageType.CALL, 0));
        multi_get_args args = new multi_get_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public multi_get_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_multi_get();
      }
    }

    public void batch_get(
        batch_get_request request,
        org.apache.thrift.async.AsyncMethodCallback<batch_get_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      batch_get_call method_call =
          new batch_get_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class batch_get_call
        extends org.apache.thrift.async.TAsyncMethodCall<batch_get_response> {
      private batch_get_request request;

      public batch_get_call(
          batch_get_request request,
          org.apache.thrift.async.AsyncMethodCallback<batch_get_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "batch_get", org.apache.thrift.protocol.TMessageType.CALL, 0));
        batch_get_args args = new batch_get_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public batch_get_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_batch_get();
      }
    }

    public void sortkey_count(
        blob hash_key, org.apache.thrift.async.AsyncMethodCallback<count_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      sortkey_count_call method_call =
          new sortkey_count_call(hash_key, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sortkey_count_call
        extends org.apache.thrift.async.TAsyncMethodCall<count_response> {
      private blob hash_key;

      public sortkey_count_call(
          blob hash_key,
          org.apache.thrift.async.AsyncMethodCallback<count_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.hash_key = hash_key;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "sortkey_count", org.apache.thrift.protocol.TMessageType.CALL, 0));
        sortkey_count_args args = new sortkey_count_args();
        args.setHash_key(hash_key);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public count_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_sortkey_count();
      }
    }

    public void ttl(
        blob key, org.apache.thrift.async.AsyncMethodCallback<ttl_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      ttl_call method_call =
          new ttl_call(key, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class ttl_call extends org.apache.thrift.async.TAsyncMethodCall<ttl_response> {
      private blob key;

      public ttl_call(
          blob key,
          org.apache.thrift.async.AsyncMethodCallback<ttl_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.key = key;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "ttl", org.apache.thrift.protocol.TMessageType.CALL, 0));
        ttl_args args = new ttl_args();
        args.setKey(key);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ttl_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_ttl();
      }
    }

    public void get_scanner(
        get_scanner_request request,
        org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      get_scanner_call method_call =
          new get_scanner_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get_scanner_call
        extends org.apache.thrift.async.TAsyncMethodCall<scan_response> {
      private get_scanner_request request;

      public get_scanner_call(
          get_scanner_request request,
          org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "get_scanner", org.apache.thrift.protocol.TMessageType.CALL, 0));
        get_scanner_args args = new get_scanner_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public scan_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_get_scanner();
      }
    }

    public void scan(
        scan_request request,
        org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      scan_call method_call =
          new scan_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall<scan_response> {
      private scan_request request;

      public scan_call(
          scan_request request,
          org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
        scan_args args = new scan_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public scan_response getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_scan();
      }
    }

    public void clear_scanner(
        long context_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
        throws org.apache.thrift.TException {
      checkReady();
      clear_scanner_call method_call =
          new clear_scanner_call(context_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class clear_scanner_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long context_id;

      public clear_scanner_call(
          long context_id,
          org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler,
          org.apache.thrift.async.TAsyncClient client,
          org.apache.thrift.protocol.TProtocolFactory protocolFactory,
          org.apache.thrift.transport.TNonblockingTransport transport)
          throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, true);
        this.context_id = context_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot)
          throws org.apache.thrift.TException {
        prot.writeMessageBegin(
            new org.apache.thrift.protocol.TMessage(
                "clear_scanner", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
        clear_scanner_args args = new clear_scanner_args();
        args.setContext_id(context_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
            new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot =
            client.getProtocolFactory().getProtocol(memoryTransport);
        return null;
      }
    }
  }

  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I>
      implements org.apache.thrift.TProcessor {
    private static final org.slf4j.Logger _LOGGER =
        org.slf4j.LoggerFactory.getLogger(Processor.class.getName());

    public Processor(I iface) {
      super(
          iface,
          getProcessMap(
              new java.util.HashMap<
                  java.lang.String,
                  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(
        I iface,
        java.util.Map<
                java.lang.String,
                org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
            processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface>
        java.util.Map<
                java.lang.String,
                org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
            getProcessMap(
                java.util.Map<
                        java.lang.String,
                        org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
                    processMap) {
      processMap.put("put", new put());
      processMap.put("multi_put", new multi_put());
      processMap.put("remove", new remove());
      processMap.put("multi_remove", new multi_remove());
      processMap.put("incr", new incr());
      processMap.put("check_and_set", new check_and_set());
      processMap.put("check_and_mutate", new check_and_mutate());
      processMap.put("get", new get());
      processMap.put("multi_get", new multi_get());
      processMap.put("batch_get", new batch_get());
      processMap.put("sortkey_count", new sortkey_count());
      processMap.put("ttl", new ttl());
      processMap.put("get_scanner", new get_scanner());
      processMap.put("scan", new scan());
      processMap.put("clear_scanner", new clear_scanner());
      return processMap;
    }

    public static class put<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, put_args> {
      public put() {
        super("put");
      }

      public put_args getEmptyArgsInstance() {
        return new put_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public put_result getResult(I iface, put_args args) throws org.apache.thrift.TException {
        put_result result = new put_result();
        result.success = iface.put(args.update);
        return result;
      }
    }

    public static class multi_put<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, multi_put_args> {
      public multi_put() {
        super("multi_put");
      }

      public multi_put_args getEmptyArgsInstance() {
        return new multi_put_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public multi_put_result getResult(I iface, multi_put_args args)
          throws org.apache.thrift.TException {
        multi_put_result result = new multi_put_result();
        result.success = iface.multi_put(args.request);
        return result;
      }
    }

    public static class remove<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, remove_args> {
      public remove() {
        super("remove");
      }

      public remove_args getEmptyArgsInstance() {
        return new remove_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public remove_result getResult(I iface, remove_args args)
          throws org.apache.thrift.TException {
        remove_result result = new remove_result();
        result.success = iface.remove(args.key);
        return result;
      }
    }

    public static class multi_remove<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, multi_remove_args> {
      public multi_remove() {
        super("multi_remove");
      }

      public multi_remove_args getEmptyArgsInstance() {
        return new multi_remove_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public multi_remove_result getResult(I iface, multi_remove_args args)
          throws org.apache.thrift.TException {
        multi_remove_result result = new multi_remove_result();
        result.success = iface.multi_remove(args.request);
        return result;
      }
    }

    public static class incr<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, incr_args> {
      public incr() {
        super("incr");
      }

      public incr_args getEmptyArgsInstance() {
        return new incr_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public incr_result getResult(I iface, incr_args args) throws org.apache.thrift.TException {
        incr_result result = new incr_result();
        result.success = iface.incr(args.request);
        return result;
      }
    }

    public static class check_and_set<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, check_and_set_args> {
      public check_and_set() {
        super("check_and_set");
      }

      public check_and_set_args getEmptyArgsInstance() {
        return new check_and_set_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public check_and_set_result getResult(I iface, check_and_set_args args)
          throws org.apache.thrift.TException {
        check_and_set_result result = new check_and_set_result();
        result.success = iface.check_and_set(args.request);
        return result;
      }
    }

    public static class check_and_mutate<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, check_and_mutate_args> {
      public check_and_mutate() {
        super("check_and_mutate");
      }

      public check_and_mutate_args getEmptyArgsInstance() {
        return new check_and_mutate_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public check_and_mutate_result getResult(I iface, check_and_mutate_args args)
          throws org.apache.thrift.TException {
        check_and_mutate_result result = new check_and_mutate_result();
        result.success = iface.check_and_mutate(args.request);
        return result;
      }
    }

    public static class get<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, get_args> {
      public get() {
        super("get");
      }

      public get_args getEmptyArgsInstance() {
        return new get_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public get_result getResult(I iface, get_args args) throws org.apache.thrift.TException {
        get_result result = new get_result();
        result.success = iface.get(args.key);
        return result;
      }
    }

    public static class multi_get<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, multi_get_args> {
      public multi_get() {
        super("multi_get");
      }

      public multi_get_args getEmptyArgsInstance() {
        return new multi_get_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public multi_get_result getResult(I iface, multi_get_args args)
          throws org.apache.thrift.TException {
        multi_get_result result = new multi_get_result();
        result.success = iface.multi_get(args.request);
        return result;
      }
    }

    public static class batch_get<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, batch_get_args> {
      public batch_get() {
        super("batch_get");
      }

      public batch_get_args getEmptyArgsInstance() {
        return new batch_get_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public batch_get_result getResult(I iface, batch_get_args args)
          throws org.apache.thrift.TException {
        batch_get_result result = new batch_get_result();
        result.success = iface.batch_get(args.request);
        return result;
      }
    }

    public static class sortkey_count<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, sortkey_count_args> {
      public sortkey_count() {
        super("sortkey_count");
      }

      public sortkey_count_args getEmptyArgsInstance() {
        return new sortkey_count_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public sortkey_count_result getResult(I iface, sortkey_count_args args)
          throws org.apache.thrift.TException {
        sortkey_count_result result = new sortkey_count_result();
        result.success = iface.sortkey_count(args.hash_key);
        return result;
      }
    }

    public static class ttl<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, ttl_args> {
      public ttl() {
        super("ttl");
      }

      public ttl_args getEmptyArgsInstance() {
        return new ttl_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public ttl_result getResult(I iface, ttl_args args) throws org.apache.thrift.TException {
        ttl_result result = new ttl_result();
        result.success = iface.ttl(args.key);
        return result;
      }
    }

    public static class get_scanner<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, get_scanner_args> {
      public get_scanner() {
        super("get_scanner");
      }

      public get_scanner_args getEmptyArgsInstance() {
        return new get_scanner_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public get_scanner_result getResult(I iface, get_scanner_args args)
          throws org.apache.thrift.TException {
        get_scanner_result result = new get_scanner_result();
        result.success = iface.get_scanner(args.request);
        return result;
      }
    }

    public static class scan<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, scan_args> {
      public scan() {
        super("scan");
      }

      public scan_args getEmptyArgsInstance() {
        return new scan_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
        scan_result result = new scan_result();
        result.success = iface.scan(args.request);
        return result;
      }
    }

    public static class clear_scanner<I extends Iface>
        extends org.apache.thrift.ProcessFunction<I, clear_scanner_args> {
      public clear_scanner() {
        super("clear_scanner");
      }

      public clear_scanner_args getEmptyArgsInstance() {
        return new clear_scanner_args();
      }

      protected boolean isOneway() {
        return true;
      }

      @Override
      protected boolean handleRuntimeExceptions() {
        return false;
      }

      public org.apache.thrift.TBase getResult(I iface, clear_scanner_args args)
          throws org.apache.thrift.TException {
        iface.clear_scanner(args.context_id);
        return null;
      }
    }
  }

  public static class AsyncProcessor<I extends AsyncIface>
      extends org.apache.thrift.TBaseAsyncProcessor<I> {
    private static final org.slf4j.Logger _LOGGER =
        org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());

    public AsyncProcessor(I iface) {
      super(
          iface,
          getProcessMap(
              new java.util.HashMap<
                  java.lang.String,
                  org.apache.thrift.AsyncProcessFunction<
                      I, ? extends org.apache.thrift.TBase, ?>>()));
    }

    protected AsyncProcessor(
        I iface,
        java.util.Map<
                java.lang.String,
                org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>
            processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends AsyncIface>
        java.util.Map<
                java.lang.String,
                org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>
            getProcessMap(
                java.util.Map<
                        java.lang.String,
                        org.apache.thrift.AsyncProcessFunction<
                            I, ? extends org.apache.thrift.TBase, ?>>
                    processMap) {
      processMap.put("put", new put());
      processMap.put("multi_put", new multi_put());
      processMap.put("remove", new remove());
      processMap.put("multi_remove", new multi_remove());
      processMap.put("incr", new incr());
      processMap.put("check_and_set", new check_and_set());
      processMap.put("check_and_mutate", new check_and_mutate());
      processMap.put("get", new get());
      processMap.put("multi_get", new multi_get());
      processMap.put("batch_get", new batch_get());
      processMap.put("sortkey_count", new sortkey_count());
      processMap.put("ttl", new ttl());
      processMap.put("get_scanner", new get_scanner());
      processMap.put("scan", new scan());
      processMap.put("clear_scanner", new clear_scanner());
      return processMap;
    }

    public static class put<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, put_args, update_response> {
      public put() {
        super("put");
      }

      public put_args getEmptyArgsInstance() {
        return new put_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<update_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<update_response>() {
          public void onComplete(update_response o) {
            put_result result = new put_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            put_result result = new put_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          put_args args,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.put(args.update, resultHandler);
      }
    }

    public static class multi_put<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, multi_put_args, update_response> {
      public multi_put() {
        super("multi_put");
      }

      public multi_put_args getEmptyArgsInstance() {
        return new multi_put_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<update_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<update_response>() {
          public void onComplete(update_response o) {
            multi_put_result result = new multi_put_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            multi_put_result result = new multi_put_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          multi_put_args args,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.multi_put(args.request, resultHandler);
      }
    }

    public static class remove<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, remove_args, update_response> {
      public remove() {
        super("remove");
      }

      public remove_args getEmptyArgsInstance() {
        return new remove_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<update_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<update_response>() {
          public void onComplete(update_response o) {
            remove_result result = new remove_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_result result = new remove_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          remove_args args,
          org.apache.thrift.async.AsyncMethodCallback<update_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.remove(args.key, resultHandler);
      }
    }

    public static class multi_remove<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<
            I, multi_remove_args, multi_remove_response> {
      public multi_remove() {
        super("multi_remove");
      }

      public multi_remove_args getEmptyArgsInstance() {
        return new multi_remove_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<multi_remove_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<multi_remove_response>() {
          public void onComplete(multi_remove_response o) {
            multi_remove_result result = new multi_remove_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            multi_remove_result result = new multi_remove_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          multi_remove_args args,
          org.apache.thrift.async.AsyncMethodCallback<multi_remove_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.multi_remove(args.request, resultHandler);
      }
    }

    public static class incr<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, incr_args, incr_response> {
      public incr() {
        super("incr");
      }

      public incr_args getEmptyArgsInstance() {
        return new incr_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<incr_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<incr_response>() {
          public void onComplete(incr_response o) {
            incr_result result = new incr_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            incr_result result = new incr_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          incr_args args,
          org.apache.thrift.async.AsyncMethodCallback<incr_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.incr(args.request, resultHandler);
      }
    }

    public static class check_and_set<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<
            I, check_and_set_args, check_and_set_response> {
      public check_and_set() {
        super("check_and_set");
      }

      public check_and_set_args getEmptyArgsInstance() {
        return new check_and_set_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<check_and_set_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<check_and_set_response>() {
          public void onComplete(check_and_set_response o) {
            check_and_set_result result = new check_and_set_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            check_and_set_result result = new check_and_set_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          check_and_set_args args,
          org.apache.thrift.async.AsyncMethodCallback<check_and_set_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.check_and_set(args.request, resultHandler);
      }
    }

    public static class check_and_mutate<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<
            I, check_and_mutate_args, check_and_mutate_response> {
      public check_and_mutate() {
        super("check_and_mutate");
      }

      public check_and_mutate_args getEmptyArgsInstance() {
        return new check_and_mutate_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response>
          getResultHandler(
              final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
              final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response>() {
          public void onComplete(check_and_mutate_response o) {
            check_and_mutate_result result = new check_and_mutate_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            check_and_mutate_result result = new check_and_mutate_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          check_and_mutate_args args,
          org.apache.thrift.async.AsyncMethodCallback<check_and_mutate_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.check_and_mutate(args.request, resultHandler);
      }
    }

    public static class get<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, get_args, read_response> {
      public get() {
        super("get");
      }

      public get_args getEmptyArgsInstance() {
        return new get_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<read_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<read_response>() {
          public void onComplete(read_response o) {
            get_result result = new get_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            get_result result = new get_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          get_args args,
          org.apache.thrift.async.AsyncMethodCallback<read_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.get(args.key, resultHandler);
      }
    }

    public static class multi_get<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, multi_get_args, multi_get_response> {
      public multi_get() {
        super("multi_get");
      }

      public multi_get_args getEmptyArgsInstance() {
        return new multi_get_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<multi_get_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<multi_get_response>() {
          public void onComplete(multi_get_response o) {
            multi_get_result result = new multi_get_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            multi_get_result result = new multi_get_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          multi_get_args args,
          org.apache.thrift.async.AsyncMethodCallback<multi_get_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.multi_get(args.request, resultHandler);
      }
    }

    public static class batch_get<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, batch_get_args, batch_get_response> {
      public batch_get() {
        super("batch_get");
      }

      public batch_get_args getEmptyArgsInstance() {
        return new batch_get_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<batch_get_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<batch_get_response>() {
          public void onComplete(batch_get_response o) {
            batch_get_result result = new batch_get_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            batch_get_result result = new batch_get_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          batch_get_args args,
          org.apache.thrift.async.AsyncMethodCallback<batch_get_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.batch_get(args.request, resultHandler);
      }
    }

    public static class sortkey_count<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, sortkey_count_args, count_response> {
      public sortkey_count() {
        super("sortkey_count");
      }

      public sortkey_count_args getEmptyArgsInstance() {
        return new sortkey_count_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<count_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<count_response>() {
          public void onComplete(count_response o) {
            sortkey_count_result result = new sortkey_count_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            sortkey_count_result result = new sortkey_count_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          sortkey_count_args args,
          org.apache.thrift.async.AsyncMethodCallback<count_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.sortkey_count(args.hash_key, resultHandler);
      }
    }

    public static class ttl<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, ttl_args, ttl_response> {
      public ttl() {
        super("ttl");
      }

      public ttl_args getEmptyArgsInstance() {
        return new ttl_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<ttl_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<ttl_response>() {
          public void onComplete(ttl_response o) {
            ttl_result result = new ttl_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            ttl_result result = new ttl_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          ttl_args args,
          org.apache.thrift.async.AsyncMethodCallback<ttl_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.ttl(args.key, resultHandler);
      }
    }

    public static class get_scanner<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, get_scanner_args, scan_response> {
      public get_scanner() {
        super("get_scanner");
      }

      public get_scanner_args getEmptyArgsInstance() {
        return new get_scanner_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<scan_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<scan_response>() {
          public void onComplete(scan_response o) {
            get_scanner_result result = new get_scanner_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            get_scanner_result result = new get_scanner_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          get_scanner_args args,
          org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.get_scanner(args.request, resultHandler);
      }
    }

    public static class scan<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, scan_args, scan_response> {
      public scan() {
        super("scan");
      }

      public scan_args getEmptyArgsInstance() {
        return new scan_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<scan_response> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<scan_response>() {
          public void onComplete(scan_response o) {
            scan_result result = new scan_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY, seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }

          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            scan_result result = new scan_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException) e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg =
                  new org.apache.thrift.TApplicationException(
                      org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb, msg, msgType, seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(
          I iface,
          scan_args args,
          org.apache.thrift.async.AsyncMethodCallback<scan_response> resultHandler)
          throws org.apache.thrift.TException {
        iface.scan(args.request, resultHandler);
      }
    }

    public static class clear_scanner<I extends AsyncIface>
        extends org.apache.thrift.AsyncProcessFunction<I, clear_scanner_args, Void> {
      public clear_scanner() {
        super("clear_scanner");
      }

      public clear_scanner_args getEmptyArgsInstance() {
        return new clear_scanner_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(
          final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
          final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
          public void onComplete(Void o) {}

          public void onError(java.lang.Exception e) {
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
            } else {
              _LOGGER.error("Exception inside oneway handler", e);
            }
          }
        };
      }

      protected boolean isOneway() {
        return true;
      }

      public void start(
          I iface,
          clear_scanner_args args,
          org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler)
          throws org.apache.thrift.TException {
        iface.clear_scanner(args.context_id, resultHandler);
      }
    }
  }

  public static class put_args
      implements org.apache.thrift.TBase<put_args, put_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<put_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("put_args");

    private static final org.apache.thrift.protocol.TField UPDATE_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "update", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new put_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new put_argsTupleSchemeFactory();

    public update_request update; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      UPDATE((short) 1, "update");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // UPDATE
            return UPDATE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.UPDATE,
          new org.apache.thrift.meta_data.FieldMetaData(
              "update",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, update_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_args.class, metaDataMap);
    }

    public put_args() {}

    public put_args(update_request update) {
      this();
      this.update = update;
    }

    /** Performs a deep copy on <i>other</i>. */
    public put_args(put_args other) {
      if (other.isSetUpdate()) {
        this.update = new update_request(other.update);
      }
    }

    public put_args deepCopy() {
      return new put_args(this);
    }

    @Override
    public void clear() {
      this.update = null;
    }

    public update_request getUpdate() {
      return this.update;
    }

    public put_args setUpdate(update_request update) {
      this.update = update;
      return this;
    }

    public void unsetUpdate() {
      this.update = null;
    }

    /** Returns true if field update is set (has been assigned a value) and false otherwise */
    public boolean isSetUpdate() {
      return this.update != null;
    }

    public void setUpdateIsSet(boolean value) {
      if (!value) {
        this.update = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case UPDATE:
          if (value == null) {
            unsetUpdate();
          } else {
            setUpdate((update_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case UPDATE:
          return getUpdate();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case UPDATE:
          return isSetUpdate();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof put_args) return this.equals((put_args) that);
      return false;
    }

    public boolean equals(put_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_update = true && this.isSetUpdate();
      boolean that_present_update = true && that.isSetUpdate();
      if (this_present_update || that_present_update) {
        if (!(this_present_update && that_present_update)) return false;
        if (!this.update.equals(that.update)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetUpdate()) ? 131071 : 524287);
      if (isSetUpdate()) hashCode = hashCode * 8191 + update.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(put_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetUpdate()).compareTo(other.isSetUpdate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUpdate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update, other.update);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("put_args(");
      boolean first = true;

      sb.append("update:");
      if (this.update == null) {
        sb.append("null");
      } else {
        sb.append(this.update);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (update != null) {
        update.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class put_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public put_argsStandardScheme getScheme() {
        return new put_argsStandardScheme();
      }
    }

    private static class put_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<put_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // UPDATE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.update = new update_request();
                struct.update.read(iprot);
                struct.setUpdateIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, put_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.update != null) {
          oprot.writeFieldBegin(UPDATE_FIELD_DESC);
          struct.update.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class put_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public put_argsTupleScheme getScheme() {
        return new put_argsTupleScheme();
      }
    }

    private static class put_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<put_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetUpdate()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetUpdate()) {
          struct.update.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.update = new update_request();
          struct.update.read(iprot);
          struct.setUpdateIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class put_result
      implements org.apache.thrift.TBase<put_result, put_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<put_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("put_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new put_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new put_resultTupleSchemeFactory();

    public update_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, update_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(put_result.class, metaDataMap);
    }

    public put_result() {}

    public put_result(update_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public put_result(put_result other) {
      if (other.isSetSuccess()) {
        this.success = new update_response(other.success);
      }
    }

    public put_result deepCopy() {
      return new put_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public update_response getSuccess() {
      return this.success;
    }

    public put_result setSuccess(update_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((update_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof put_result) return this.equals((put_result) that);
      return false;
    }

    public boolean equals(put_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(put_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("put_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class put_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public put_resultStandardScheme getScheme() {
        return new put_resultStandardScheme();
      }
    }

    private static class put_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<put_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new update_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, put_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class put_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public put_resultTupleScheme getScheme() {
        return new put_resultTupleScheme();
      }
    }

    private static class put_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<put_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new update_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_put_args
      implements org.apache.thrift.TBase<multi_put_args, multi_put_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_put_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_put_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_put_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_put_argsTupleSchemeFactory();

    public multi_put_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, multi_put_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_put_args.class, metaDataMap);
    }

    public multi_put_args() {}

    public multi_put_args(multi_put_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_put_args(multi_put_args other) {
      if (other.isSetRequest()) {
        this.request = new multi_put_request(other.request);
      }
    }

    public multi_put_args deepCopy() {
      return new multi_put_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public multi_put_request getRequest() {
      return this.request;
    }

    public multi_put_args setRequest(multi_put_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((multi_put_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_put_args) return this.equals((multi_put_args) that);
      return false;
    }

    public boolean equals(multi_put_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_put_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_put_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_put_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_put_argsStandardScheme getScheme() {
        return new multi_put_argsStandardScheme();
      }
    }

    private static class multi_put_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_put_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new multi_put_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_put_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_put_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_put_argsTupleScheme getScheme() {
        return new multi_put_argsTupleScheme();
      }
    }

    private static class multi_put_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_put_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_put_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new multi_put_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_put_result
      implements org.apache.thrift.TBase<multi_put_result, multi_put_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_put_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_put_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_put_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_put_resultTupleSchemeFactory();

    public update_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, update_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_put_result.class, metaDataMap);
    }

    public multi_put_result() {}

    public multi_put_result(update_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_put_result(multi_put_result other) {
      if (other.isSetSuccess()) {
        this.success = new update_response(other.success);
      }
    }

    public multi_put_result deepCopy() {
      return new multi_put_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public update_response getSuccess() {
      return this.success;
    }

    public multi_put_result setSuccess(update_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((update_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_put_result) return this.equals((multi_put_result) that);
      return false;
    }

    public boolean equals(multi_put_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_put_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_put_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_put_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_put_resultStandardScheme getScheme() {
        return new multi_put_resultStandardScheme();
      }
    }

    private static class multi_put_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_put_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new update_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_put_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_put_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_put_resultTupleScheme getScheme() {
        return new multi_put_resultTupleScheme();
      }
    }

    private static class multi_put_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_put_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_put_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new update_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class remove_args
      implements org.apache.thrift.TBase<remove_args, remove_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<remove_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("remove_args");

    private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new remove_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new remove_argsTupleSchemeFactory();

    public blob key; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      KEY((short) 1, "key");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // KEY
            return KEY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.KEY,
          new org.apache.thrift.meta_data.FieldMetaData(
              "key",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, blob.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          remove_args.class, metaDataMap);
    }

    public remove_args() {}

    public remove_args(blob key) {
      this();
      this.key = key;
    }

    /** Performs a deep copy on <i>other</i>. */
    public remove_args(remove_args other) {
      if (other.isSetKey()) {
        this.key = new blob(other.key);
      }
    }

    public remove_args deepCopy() {
      return new remove_args(this);
    }

    @Override
    public void clear() {
      this.key = null;
    }

    public blob getKey() {
      return this.key;
    }

    public remove_args setKey(blob key) {
      this.key = key;
      return this;
    }

    public void unsetKey() {
      this.key = null;
    }

    /** Returns true if field key is set (has been assigned a value) and false otherwise */
    public boolean isSetKey() {
      return this.key != null;
    }

    public void setKeyIsSet(boolean value) {
      if (!value) {
        this.key = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case KEY:
          if (value == null) {
            unsetKey();
          } else {
            setKey((blob) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case KEY:
          return getKey();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case KEY:
          return isSetKey();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof remove_args) return this.equals((remove_args) that);
      return false;
    }

    public boolean equals(remove_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_key = true && this.isSetKey();
      boolean that_present_key = true && that.isSetKey();
      if (this_present_key || that_present_key) {
        if (!(this_present_key && that_present_key)) return false;
        if (!this.key.equals(that.key)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
      if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(remove_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_args(");
      boolean first = true;

      sb.append("key:");
      if (this.key == null) {
        sb.append("null");
      } else {
        sb.append(this.key);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (key != null) {
        key.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class remove_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public remove_argsStandardScheme getScheme() {
        return new remove_argsStandardScheme();
      }
    }

    private static class remove_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<remove_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // KEY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.key = new blob();
                struct.key.read(iprot);
                struct.setKeyIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, remove_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.key != null) {
          oprot.writeFieldBegin(KEY_FIELD_DESC);
          struct.key.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class remove_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public remove_argsTupleScheme getScheme() {
        return new remove_argsTupleScheme();
      }
    }

    private static class remove_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<remove_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetKey()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetKey()) {
          struct.key.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.key = new blob();
          struct.key.read(iprot);
          struct.setKeyIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class remove_result
      implements org.apache.thrift.TBase<remove_result, remove_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<remove_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("remove_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new remove_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new remove_resultTupleSchemeFactory();

    public update_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, update_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          remove_result.class, metaDataMap);
    }

    public remove_result() {}

    public remove_result(update_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public remove_result(remove_result other) {
      if (other.isSetSuccess()) {
        this.success = new update_response(other.success);
      }
    }

    public remove_result deepCopy() {
      return new remove_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public update_response getSuccess() {
      return this.success;
    }

    public remove_result setSuccess(update_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((update_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof remove_result) return this.equals((remove_result) that);
      return false;
    }

    public boolean equals(remove_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(remove_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class remove_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public remove_resultStandardScheme getScheme() {
        return new remove_resultStandardScheme();
      }
    }

    private static class remove_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<remove_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new update_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, remove_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class remove_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public remove_resultTupleScheme getScheme() {
        return new remove_resultTupleScheme();
      }
    }

    private static class remove_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<remove_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new update_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_remove_args
      implements org.apache.thrift.TBase<multi_remove_args, multi_remove_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_remove_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_remove_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_remove_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_remove_argsTupleSchemeFactory();

    public multi_remove_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, multi_remove_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_remove_args.class, metaDataMap);
    }

    public multi_remove_args() {}

    public multi_remove_args(multi_remove_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_remove_args(multi_remove_args other) {
      if (other.isSetRequest()) {
        this.request = new multi_remove_request(other.request);
      }
    }

    public multi_remove_args deepCopy() {
      return new multi_remove_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public multi_remove_request getRequest() {
      return this.request;
    }

    public multi_remove_args setRequest(multi_remove_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((multi_remove_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_remove_args) return this.equals((multi_remove_args) that);
      return false;
    }

    public boolean equals(multi_remove_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_remove_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_remove_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_remove_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_remove_argsStandardScheme getScheme() {
        return new multi_remove_argsStandardScheme();
      }
    }

    private static class multi_remove_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_remove_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new multi_remove_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_remove_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_remove_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_remove_argsTupleScheme getScheme() {
        return new multi_remove_argsTupleScheme();
      }
    }

    private static class multi_remove_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_remove_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_remove_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new multi_remove_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_remove_result
      implements org.apache.thrift.TBase<multi_remove_result, multi_remove_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_remove_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_remove_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_remove_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_remove_resultTupleSchemeFactory();

    public multi_remove_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, multi_remove_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_remove_result.class, metaDataMap);
    }

    public multi_remove_result() {}

    public multi_remove_result(multi_remove_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_remove_result(multi_remove_result other) {
      if (other.isSetSuccess()) {
        this.success = new multi_remove_response(other.success);
      }
    }

    public multi_remove_result deepCopy() {
      return new multi_remove_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public multi_remove_response getSuccess() {
      return this.success;
    }

    public multi_remove_result setSuccess(multi_remove_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((multi_remove_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_remove_result) return this.equals((multi_remove_result) that);
      return false;
    }

    public boolean equals(multi_remove_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_remove_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_remove_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_remove_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_remove_resultStandardScheme getScheme() {
        return new multi_remove_resultStandardScheme();
      }
    }

    private static class multi_remove_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_remove_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new multi_remove_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_remove_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_remove_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_remove_resultTupleScheme getScheme() {
        return new multi_remove_resultTupleScheme();
      }
    }

    private static class multi_remove_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_remove_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_remove_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new multi_remove_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class incr_args
      implements org.apache.thrift.TBase<incr_args, incr_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<incr_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("incr_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new incr_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new incr_argsTupleSchemeFactory();

    public incr_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, incr_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(incr_args.class, metaDataMap);
    }

    public incr_args() {}

    public incr_args(incr_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public incr_args(incr_args other) {
      if (other.isSetRequest()) {
        this.request = new incr_request(other.request);
      }
    }

    public incr_args deepCopy() {
      return new incr_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public incr_request getRequest() {
      return this.request;
    }

    public incr_args setRequest(incr_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((incr_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof incr_args) return this.equals((incr_args) that);
      return false;
    }

    public boolean equals(incr_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(incr_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("incr_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class incr_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public incr_argsStandardScheme getScheme() {
        return new incr_argsStandardScheme();
      }
    }

    private static class incr_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<incr_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, incr_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new incr_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, incr_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class incr_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public incr_argsTupleScheme getScheme() {
        return new incr_argsTupleScheme();
      }
    }

    private static class incr_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<incr_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, incr_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, incr_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new incr_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class incr_result
      implements org.apache.thrift.TBase<incr_result, incr_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<incr_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("incr_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new incr_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new incr_resultTupleSchemeFactory();

    public incr_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, incr_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          incr_result.class, metaDataMap);
    }

    public incr_result() {}

    public incr_result(incr_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public incr_result(incr_result other) {
      if (other.isSetSuccess()) {
        this.success = new incr_response(other.success);
      }
    }

    public incr_result deepCopy() {
      return new incr_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public incr_response getSuccess() {
      return this.success;
    }

    public incr_result setSuccess(incr_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((incr_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof incr_result) return this.equals((incr_result) that);
      return false;
    }

    public boolean equals(incr_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(incr_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("incr_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class incr_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public incr_resultStandardScheme getScheme() {
        return new incr_resultStandardScheme();
      }
    }

    private static class incr_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<incr_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, incr_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new incr_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, incr_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class incr_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public incr_resultTupleScheme getScheme() {
        return new incr_resultTupleScheme();
      }
    }

    private static class incr_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<incr_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, incr_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, incr_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new incr_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class check_and_set_args
      implements org.apache.thrift.TBase<check_and_set_args, check_and_set_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<check_and_set_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("check_and_set_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new check_and_set_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new check_and_set_argsTupleSchemeFactory();

    public check_and_set_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, check_and_set_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          check_and_set_args.class, metaDataMap);
    }

    public check_and_set_args() {}

    public check_and_set_args(check_and_set_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public check_and_set_args(check_and_set_args other) {
      if (other.isSetRequest()) {
        this.request = new check_and_set_request(other.request);
      }
    }

    public check_and_set_args deepCopy() {
      return new check_and_set_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public check_and_set_request getRequest() {
      return this.request;
    }

    public check_and_set_args setRequest(check_and_set_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((check_and_set_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof check_and_set_args) return this.equals((check_and_set_args) that);
      return false;
    }

    public boolean equals(check_and_set_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(check_and_set_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_set_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class check_and_set_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_set_argsStandardScheme getScheme() {
        return new check_and_set_argsStandardScheme();
      }
    }

    private static class check_and_set_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<check_and_set_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_set_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new check_and_set_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_set_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class check_and_set_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_set_argsTupleScheme getScheme() {
        return new check_and_set_argsTupleScheme();
      }
    }

    private static class check_and_set_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<check_and_set_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, check_and_set_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, check_and_set_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new check_and_set_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class check_and_set_result
      implements org.apache.thrift.TBase<check_and_set_result, check_and_set_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<check_and_set_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("check_and_set_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new check_and_set_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new check_and_set_resultTupleSchemeFactory();

    public check_and_set_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, check_and_set_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          check_and_set_result.class, metaDataMap);
    }

    public check_and_set_result() {}

    public check_and_set_result(check_and_set_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public check_and_set_result(check_and_set_result other) {
      if (other.isSetSuccess()) {
        this.success = new check_and_set_response(other.success);
      }
    }

    public check_and_set_result deepCopy() {
      return new check_and_set_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public check_and_set_response getSuccess() {
      return this.success;
    }

    public check_and_set_result setSuccess(check_and_set_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((check_and_set_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof check_and_set_result) return this.equals((check_and_set_result) that);
      return false;
    }

    public boolean equals(check_and_set_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(check_and_set_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_set_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class check_and_set_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_set_resultStandardScheme getScheme() {
        return new check_and_set_resultStandardScheme();
      }
    }

    private static class check_and_set_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<check_and_set_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_set_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new check_and_set_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_set_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class check_and_set_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_set_resultTupleScheme getScheme() {
        return new check_and_set_resultTupleScheme();
      }
    }

    private static class check_and_set_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<check_and_set_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, check_and_set_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, check_and_set_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new check_and_set_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class check_and_mutate_args
      implements org.apache.thrift.TBase<check_and_mutate_args, check_and_mutate_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<check_and_mutate_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("check_and_mutate_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new check_and_mutate_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new check_and_mutate_argsTupleSchemeFactory();

    public check_and_mutate_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, check_and_mutate_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          check_and_mutate_args.class, metaDataMap);
    }

    public check_and_mutate_args() {}

    public check_and_mutate_args(check_and_mutate_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public check_and_mutate_args(check_and_mutate_args other) {
      if (other.isSetRequest()) {
        this.request = new check_and_mutate_request(other.request);
      }
    }

    public check_and_mutate_args deepCopy() {
      return new check_and_mutate_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public check_and_mutate_request getRequest() {
      return this.request;
    }

    public check_and_mutate_args setRequest(check_and_mutate_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((check_and_mutate_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof check_and_mutate_args) return this.equals((check_and_mutate_args) that);
      return false;
    }

    public boolean equals(check_and_mutate_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(check_and_mutate_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_mutate_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class check_and_mutate_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_mutate_argsStandardScheme getScheme() {
        return new check_and_mutate_argsStandardScheme();
      }
    }

    private static class check_and_mutate_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<check_and_mutate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_mutate_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new check_and_mutate_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_mutate_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class check_and_mutate_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_mutate_argsTupleScheme getScheme() {
        return new check_and_mutate_argsTupleScheme();
      }
    }

    private static class check_and_mutate_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<check_and_mutate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new check_and_mutate_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class check_and_mutate_result
      implements org.apache.thrift.TBase<check_and_mutate_result, check_and_mutate_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<check_and_mutate_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("check_and_mutate_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new check_and_mutate_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new check_and_mutate_resultTupleSchemeFactory();

    public check_and_mutate_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, check_and_mutate_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          check_and_mutate_result.class, metaDataMap);
    }

    public check_and_mutate_result() {}

    public check_and_mutate_result(check_and_mutate_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public check_and_mutate_result(check_and_mutate_result other) {
      if (other.isSetSuccess()) {
        this.success = new check_and_mutate_response(other.success);
      }
    }

    public check_and_mutate_result deepCopy() {
      return new check_and_mutate_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public check_and_mutate_response getSuccess() {
      return this.success;
    }

    public check_and_mutate_result setSuccess(check_and_mutate_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((check_and_mutate_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof check_and_mutate_result)
        return this.equals((check_and_mutate_result) that);
      return false;
    }

    public boolean equals(check_and_mutate_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(check_and_mutate_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("check_and_mutate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class check_and_mutate_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_mutate_resultStandardScheme getScheme() {
        return new check_and_mutate_resultStandardScheme();
      }
    }

    private static class check_and_mutate_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<check_and_mutate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, check_and_mutate_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new check_and_mutate_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, check_and_mutate_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class check_and_mutate_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public check_and_mutate_resultTupleScheme getScheme() {
        return new check_and_mutate_resultTupleScheme();
      }
    }

    private static class check_and_mutate_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<check_and_mutate_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new check_and_mutate_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class get_args
      implements org.apache.thrift.TBase<get_args, get_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<get_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("get_args");

    private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new get_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new get_argsTupleSchemeFactory();

    public blob key; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      KEY((short) 1, "key");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // KEY
            return KEY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.KEY,
          new org.apache.thrift.meta_data.FieldMetaData(
              "key",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, blob.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap);
    }

    public get_args() {}

    public get_args(blob key) {
      this();
      this.key = key;
    }

    /** Performs a deep copy on <i>other</i>. */
    public get_args(get_args other) {
      if (other.isSetKey()) {
        this.key = new blob(other.key);
      }
    }

    public get_args deepCopy() {
      return new get_args(this);
    }

    @Override
    public void clear() {
      this.key = null;
    }

    public blob getKey() {
      return this.key;
    }

    public get_args setKey(blob key) {
      this.key = key;
      return this;
    }

    public void unsetKey() {
      this.key = null;
    }

    /** Returns true if field key is set (has been assigned a value) and false otherwise */
    public boolean isSetKey() {
      return this.key != null;
    }

    public void setKeyIsSet(boolean value) {
      if (!value) {
        this.key = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case KEY:
          if (value == null) {
            unsetKey();
          } else {
            setKey((blob) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case KEY:
          return getKey();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case KEY:
          return isSetKey();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof get_args) return this.equals((get_args) that);
      return false;
    }

    public boolean equals(get_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_key = true && this.isSetKey();
      boolean that_present_key = true && that.isSetKey();
      if (this_present_key || that_present_key) {
        if (!(this_present_key && that_present_key)) return false;
        if (!this.key.equals(that.key)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
      if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(get_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_args(");
      boolean first = true;

      sb.append("key:");
      if (this.key == null) {
        sb.append("null");
      } else {
        sb.append(this.key);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (key != null) {
        key.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class get_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_argsStandardScheme getScheme() {
        return new get_argsStandardScheme();
      }
    }

    private static class get_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<get_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // KEY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.key = new blob();
                struct.key.read(iprot);
                struct.setKeyIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.key != null) {
          oprot.writeFieldBegin(KEY_FIELD_DESC);
          struct.key.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class get_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_argsTupleScheme getScheme() {
        return new get_argsTupleScheme();
      }
    }

    private static class get_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<get_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetKey()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetKey()) {
          struct.key.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.key = new blob();
          struct.key.read(iprot);
          struct.setKeyIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class get_result
      implements org.apache.thrift.TBase<get_result, get_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<get_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("get_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new get_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new get_resultTupleSchemeFactory();

    public read_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, read_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap);
    }

    public get_result() {}

    public get_result(read_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public get_result(get_result other) {
      if (other.isSetSuccess()) {
        this.success = new read_response(other.success);
      }
    }

    public get_result deepCopy() {
      return new get_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public read_response getSuccess() {
      return this.success;
    }

    public get_result setSuccess(read_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((read_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof get_result) return this.equals((get_result) that);
      return false;
    }

    public boolean equals(get_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(get_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class get_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_resultStandardScheme getScheme() {
        return new get_resultStandardScheme();
      }
    }

    private static class get_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<get_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new read_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class get_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_resultTupleScheme getScheme() {
        return new get_resultTupleScheme();
      }
    }

    private static class get_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<get_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new read_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_get_args
      implements org.apache.thrift.TBase<multi_get_args, multi_get_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_get_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_get_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_get_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_get_argsTupleSchemeFactory();

    public multi_get_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, multi_get_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_get_args.class, metaDataMap);
    }

    public multi_get_args() {}

    public multi_get_args(multi_get_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_get_args(multi_get_args other) {
      if (other.isSetRequest()) {
        this.request = new multi_get_request(other.request);
      }
    }

    public multi_get_args deepCopy() {
      return new multi_get_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public multi_get_request getRequest() {
      return this.request;
    }

    public multi_get_args setRequest(multi_get_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((multi_get_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_get_args) return this.equals((multi_get_args) that);
      return false;
    }

    public boolean equals(multi_get_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_get_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_get_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_get_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_get_argsStandardScheme getScheme() {
        return new multi_get_argsStandardScheme();
      }
    }

    private static class multi_get_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_get_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new multi_get_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_get_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_get_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_get_argsTupleScheme getScheme() {
        return new multi_get_argsTupleScheme();
      }
    }

    private static class multi_get_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_get_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new multi_get_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class multi_get_result
      implements org.apache.thrift.TBase<multi_get_result, multi_get_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<multi_get_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("multi_get_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new multi_get_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new multi_get_resultTupleSchemeFactory();

    public multi_get_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, multi_get_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          multi_get_result.class, metaDataMap);
    }

    public multi_get_result() {}

    public multi_get_result(multi_get_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public multi_get_result(multi_get_result other) {
      if (other.isSetSuccess()) {
        this.success = new multi_get_response(other.success);
      }
    }

    public multi_get_result deepCopy() {
      return new multi_get_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public multi_get_response getSuccess() {
      return this.success;
    }

    public multi_get_result setSuccess(multi_get_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((multi_get_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof multi_get_result) return this.equals((multi_get_result) that);
      return false;
    }

    public boolean equals(multi_get_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(multi_get_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("multi_get_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class multi_get_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_get_resultStandardScheme getScheme() {
        return new multi_get_resultStandardScheme();
      }
    }

    private static class multi_get_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<multi_get_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, multi_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new multi_get_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, multi_get_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class multi_get_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public multi_get_resultTupleScheme getScheme() {
        return new multi_get_resultTupleScheme();
      }
    }

    private static class multi_get_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<multi_get_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, multi_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, multi_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new multi_get_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class batch_get_args
      implements org.apache.thrift.TBase<batch_get_args, batch_get_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<batch_get_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("batch_get_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new batch_get_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new batch_get_argsTupleSchemeFactory();

    public batch_get_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, batch_get_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          batch_get_args.class, metaDataMap);
    }

    public batch_get_args() {}

    public batch_get_args(batch_get_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public batch_get_args(batch_get_args other) {
      if (other.isSetRequest()) {
        this.request = new batch_get_request(other.request);
      }
    }

    public batch_get_args deepCopy() {
      return new batch_get_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public batch_get_request getRequest() {
      return this.request;
    }

    public batch_get_args setRequest(batch_get_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((batch_get_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof batch_get_args) return this.equals((batch_get_args) that);
      return false;
    }

    public boolean equals(batch_get_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(batch_get_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("batch_get_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class batch_get_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public batch_get_argsStandardScheme getScheme() {
        return new batch_get_argsStandardScheme();
      }
    }

    private static class batch_get_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<batch_get_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, batch_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new batch_get_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, batch_get_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class batch_get_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public batch_get_argsTupleScheme getScheme() {
        return new batch_get_argsTupleScheme();
      }
    }

    private static class batch_get_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<batch_get_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, batch_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, batch_get_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new batch_get_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class batch_get_result
      implements org.apache.thrift.TBase<batch_get_result, batch_get_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<batch_get_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("batch_get_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new batch_get_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new batch_get_resultTupleSchemeFactory();

    public batch_get_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, batch_get_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          batch_get_result.class, metaDataMap);
    }

    public batch_get_result() {}

    public batch_get_result(batch_get_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public batch_get_result(batch_get_result other) {
      if (other.isSetSuccess()) {
        this.success = new batch_get_response(other.success);
      }
    }

    public batch_get_result deepCopy() {
      return new batch_get_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public batch_get_response getSuccess() {
      return this.success;
    }

    public batch_get_result setSuccess(batch_get_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((batch_get_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof batch_get_result) return this.equals((batch_get_result) that);
      return false;
    }

    public boolean equals(batch_get_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(batch_get_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("batch_get_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class batch_get_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public batch_get_resultStandardScheme getScheme() {
        return new batch_get_resultStandardScheme();
      }
    }

    private static class batch_get_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<batch_get_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, batch_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new batch_get_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, batch_get_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class batch_get_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public batch_get_resultTupleScheme getScheme() {
        return new batch_get_resultTupleScheme();
      }
    }

    private static class batch_get_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<batch_get_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, batch_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, batch_get_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new batch_get_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class sortkey_count_args
      implements org.apache.thrift.TBase<sortkey_count_args, sortkey_count_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<sortkey_count_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("sortkey_count_args");

    private static final org.apache.thrift.protocol.TField HASH_KEY_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "hash_key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new sortkey_count_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new sortkey_count_argsTupleSchemeFactory();

    public blob hash_key; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      HASH_KEY((short) 1, "hash_key");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // HASH_KEY
            return HASH_KEY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.HASH_KEY,
          new org.apache.thrift.meta_data.FieldMetaData(
              "hash_key",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, blob.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          sortkey_count_args.class, metaDataMap);
    }

    public sortkey_count_args() {}

    public sortkey_count_args(blob hash_key) {
      this();
      this.hash_key = hash_key;
    }

    /** Performs a deep copy on <i>other</i>. */
    public sortkey_count_args(sortkey_count_args other) {
      if (other.isSetHash_key()) {
        this.hash_key = new blob(other.hash_key);
      }
    }

    public sortkey_count_args deepCopy() {
      return new sortkey_count_args(this);
    }

    @Override
    public void clear() {
      this.hash_key = null;
    }

    public blob getHash_key() {
      return this.hash_key;
    }

    public sortkey_count_args setHash_key(blob hash_key) {
      this.hash_key = hash_key;
      return this;
    }

    public void unsetHash_key() {
      this.hash_key = null;
    }

    /** Returns true if field hash_key is set (has been assigned a value) and false otherwise */
    public boolean isSetHash_key() {
      return this.hash_key != null;
    }

    public void setHash_keyIsSet(boolean value) {
      if (!value) {
        this.hash_key = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case HASH_KEY:
          if (value == null) {
            unsetHash_key();
          } else {
            setHash_key((blob) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case HASH_KEY:
          return getHash_key();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case HASH_KEY:
          return isSetHash_key();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof sortkey_count_args) return this.equals((sortkey_count_args) that);
      return false;
    }

    public boolean equals(sortkey_count_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_hash_key = true && this.isSetHash_key();
      boolean that_present_hash_key = true && that.isSetHash_key();
      if (this_present_hash_key || that_present_hash_key) {
        if (!(this_present_hash_key && that_present_hash_key)) return false;
        if (!this.hash_key.equals(that.hash_key)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetHash_key()) ? 131071 : 524287);
      if (isSetHash_key()) hashCode = hashCode * 8191 + hash_key.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(sortkey_count_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetHash_key()).compareTo(other.isSetHash_key());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHash_key()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hash_key, other.hash_key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("sortkey_count_args(");
      boolean first = true;

      sb.append("hash_key:");
      if (this.hash_key == null) {
        sb.append("null");
      } else {
        sb.append(this.hash_key);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (hash_key != null) {
        hash_key.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class sortkey_count_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public sortkey_count_argsStandardScheme getScheme() {
        return new sortkey_count_argsStandardScheme();
      }
    }

    private static class sortkey_count_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<sortkey_count_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, sortkey_count_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // HASH_KEY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.hash_key = new blob();
                struct.hash_key.read(iprot);
                struct.setHash_keyIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, sortkey_count_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.hash_key != null) {
          oprot.writeFieldBegin(HASH_KEY_FIELD_DESC);
          struct.hash_key.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class sortkey_count_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public sortkey_count_argsTupleScheme getScheme() {
        return new sortkey_count_argsTupleScheme();
      }
    }

    private static class sortkey_count_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<sortkey_count_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, sortkey_count_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetHash_key()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetHash_key()) {
          struct.hash_key.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, sortkey_count_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.hash_key = new blob();
          struct.hash_key.read(iprot);
          struct.setHash_keyIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class sortkey_count_result
      implements org.apache.thrift.TBase<sortkey_count_result, sortkey_count_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<sortkey_count_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("sortkey_count_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new sortkey_count_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new sortkey_count_resultTupleSchemeFactory();

    public count_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, count_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          sortkey_count_result.class, metaDataMap);
    }

    public sortkey_count_result() {}

    public sortkey_count_result(count_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public sortkey_count_result(sortkey_count_result other) {
      if (other.isSetSuccess()) {
        this.success = new count_response(other.success);
      }
    }

    public sortkey_count_result deepCopy() {
      return new sortkey_count_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public count_response getSuccess() {
      return this.success;
    }

    public sortkey_count_result setSuccess(count_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((count_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof sortkey_count_result) return this.equals((sortkey_count_result) that);
      return false;
    }

    public boolean equals(sortkey_count_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(sortkey_count_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("sortkey_count_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class sortkey_count_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public sortkey_count_resultStandardScheme getScheme() {
        return new sortkey_count_resultStandardScheme();
      }
    }

    private static class sortkey_count_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<sortkey_count_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, sortkey_count_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new count_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, sortkey_count_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class sortkey_count_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public sortkey_count_resultTupleScheme getScheme() {
        return new sortkey_count_resultTupleScheme();
      }
    }

    private static class sortkey_count_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<sortkey_count_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, sortkey_count_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, sortkey_count_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new count_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class ttl_args
      implements org.apache.thrift.TBase<ttl_args, ttl_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<ttl_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("ttl_args");

    private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "key", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new ttl_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new ttl_argsTupleSchemeFactory();

    public blob key; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      KEY((short) 1, "key");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // KEY
            return KEY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.KEY,
          new org.apache.thrift.meta_data.FieldMetaData(
              "key",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, blob.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ttl_args.class, metaDataMap);
    }

    public ttl_args() {}

    public ttl_args(blob key) {
      this();
      this.key = key;
    }

    /** Performs a deep copy on <i>other</i>. */
    public ttl_args(ttl_args other) {
      if (other.isSetKey()) {
        this.key = new blob(other.key);
      }
    }

    public ttl_args deepCopy() {
      return new ttl_args(this);
    }

    @Override
    public void clear() {
      this.key = null;
    }

    public blob getKey() {
      return this.key;
    }

    public ttl_args setKey(blob key) {
      this.key = key;
      return this;
    }

    public void unsetKey() {
      this.key = null;
    }

    /** Returns true if field key is set (has been assigned a value) and false otherwise */
    public boolean isSetKey() {
      return this.key != null;
    }

    public void setKeyIsSet(boolean value) {
      if (!value) {
        this.key = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case KEY:
          if (value == null) {
            unsetKey();
          } else {
            setKey((blob) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case KEY:
          return getKey();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case KEY:
          return isSetKey();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof ttl_args) return this.equals((ttl_args) that);
      return false;
    }

    public boolean equals(ttl_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_key = true && this.isSetKey();
      boolean that_present_key = true && that.isSetKey();
      if (this_present_key || that_present_key) {
        if (!(this_present_key && that_present_key)) return false;
        if (!this.key.equals(that.key)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287);
      if (isSetKey()) hashCode = hashCode * 8191 + key.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(ttl_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ttl_args(");
      boolean first = true;

      sb.append("key:");
      if (this.key == null) {
        sb.append("null");
      } else {
        sb.append(this.key);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (key != null) {
        key.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ttl_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public ttl_argsStandardScheme getScheme() {
        return new ttl_argsStandardScheme();
      }
    }

    private static class ttl_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<ttl_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ttl_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // KEY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.key = new blob();
                struct.key.read(iprot);
                struct.setKeyIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, ttl_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.key != null) {
          oprot.writeFieldBegin(KEY_FIELD_DESC);
          struct.key.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class ttl_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public ttl_argsTupleScheme getScheme() {
        return new ttl_argsTupleScheme();
      }
    }

    private static class ttl_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<ttl_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, ttl_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetKey()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetKey()) {
          struct.key.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, ttl_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.key = new blob();
          struct.key.read(iprot);
          struct.setKeyIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class ttl_result
      implements org.apache.thrift.TBase<ttl_result, ttl_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<ttl_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("ttl_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new ttl_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new ttl_resultTupleSchemeFactory();

    public ttl_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, ttl_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ttl_result.class, metaDataMap);
    }

    public ttl_result() {}

    public ttl_result(ttl_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public ttl_result(ttl_result other) {
      if (other.isSetSuccess()) {
        this.success = new ttl_response(other.success);
      }
    }

    public ttl_result deepCopy() {
      return new ttl_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public ttl_response getSuccess() {
      return this.success;
    }

    public ttl_result setSuccess(ttl_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((ttl_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof ttl_result) return this.equals((ttl_result) that);
      return false;
    }

    public boolean equals(ttl_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(ttl_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ttl_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ttl_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public ttl_resultStandardScheme getScheme() {
        return new ttl_resultStandardScheme();
      }
    }

    private static class ttl_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<ttl_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ttl_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new ttl_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, ttl_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class ttl_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public ttl_resultTupleScheme getScheme() {
        return new ttl_resultTupleScheme();
      }
    }

    private static class ttl_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<ttl_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, ttl_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, ttl_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new ttl_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class get_scanner_args
      implements org.apache.thrift.TBase<get_scanner_args, get_scanner_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<get_scanner_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("get_scanner_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new get_scanner_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new get_scanner_argsTupleSchemeFactory();

    public get_scanner_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, get_scanner_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          get_scanner_args.class, metaDataMap);
    }

    public get_scanner_args() {}

    public get_scanner_args(get_scanner_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public get_scanner_args(get_scanner_args other) {
      if (other.isSetRequest()) {
        this.request = new get_scanner_request(other.request);
      }
    }

    public get_scanner_args deepCopy() {
      return new get_scanner_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public get_scanner_request getRequest() {
      return this.request;
    }

    public get_scanner_args setRequest(get_scanner_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((get_scanner_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof get_scanner_args) return this.equals((get_scanner_args) that);
      return false;
    }

    public boolean equals(get_scanner_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(get_scanner_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_scanner_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class get_scanner_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_scanner_argsStandardScheme getScheme() {
        return new get_scanner_argsStandardScheme();
      }
    }

    private static class get_scanner_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<get_scanner_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new get_scanner_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, get_scanner_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class get_scanner_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_scanner_argsTupleScheme getScheme() {
        return new get_scanner_argsTupleScheme();
      }
    }

    private static class get_scanner_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<get_scanner_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new get_scanner_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class get_scanner_result
      implements org.apache.thrift.TBase<get_scanner_result, get_scanner_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<get_scanner_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("get_scanner_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new get_scanner_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new get_scanner_resultTupleSchemeFactory();

    public scan_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, scan_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          get_scanner_result.class, metaDataMap);
    }

    public get_scanner_result() {}

    public get_scanner_result(scan_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public get_scanner_result(get_scanner_result other) {
      if (other.isSetSuccess()) {
        this.success = new scan_response(other.success);
      }
    }

    public get_scanner_result deepCopy() {
      return new get_scanner_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public scan_response getSuccess() {
      return this.success;
    }

    public get_scanner_result setSuccess(scan_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((scan_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof get_scanner_result) return this.equals((get_scanner_result) that);
      return false;
    }

    public boolean equals(get_scanner_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(get_scanner_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_scanner_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class get_scanner_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_scanner_resultStandardScheme getScheme() {
        return new get_scanner_resultStandardScheme();
      }
    }

    private static class get_scanner_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<get_scanner_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_scanner_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new scan_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, get_scanner_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class get_scanner_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public get_scanner_resultTupleScheme getScheme() {
        return new get_scanner_resultTupleScheme();
      }
    }

    private static class get_scanner_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<get_scanner_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_scanner_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_scanner_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new scan_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class scan_args
      implements org.apache.thrift.TBase<scan_args, scan_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<scan_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("scan_args");

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "request", org.apache.thrift.protocol.TType.STRUCT, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new scan_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new scan_argsTupleSchemeFactory();

    public scan_request request; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      REQUEST((short) 1, "request");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.REQUEST,
          new org.apache.thrift.meta_data.FieldMetaData(
              "request",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, scan_request.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
    }

    public scan_args() {}

    public scan_args(scan_request request) {
      this();
      this.request = request;
    }

    /** Performs a deep copy on <i>other</i>. */
    public scan_args(scan_args other) {
      if (other.isSetRequest()) {
        this.request = new scan_request(other.request);
      }
    }

    public scan_args deepCopy() {
      return new scan_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public scan_request getRequest() {
      return this.request;
    }

    public scan_args setRequest(scan_request request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

    /** Returns true if field request is set (has been assigned a value) and false otherwise */
    public boolean isSetRequest() {
      return this.request != null;
    }

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case REQUEST:
          if (value == null) {
            unsetRequest();
          } else {
            setRequest((scan_request) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case REQUEST:
          return getRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case REQUEST:
          return isSetRequest();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof scan_args) return this.equals((scan_args) that);
      return false;
    }

    public boolean equals(scan_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request)) return false;
        if (!this.request.equals(that.request)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRequest()) ? 131071 : 524287);
      if (isSetRequest()) hashCode = hashCode * 8191 + request.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(scan_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("scan_args(");
      boolean first = true;

      sb.append("request:");
      if (this.request == null) {
        sb.append("null");
      } else {
        sb.append(this.request);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (request != null) {
        request.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class scan_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public scan_argsStandardScheme getScheme() {
        return new scan_argsStandardScheme();
      }
    }

    private static class scan_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<scan_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, scan_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new scan_request();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, scan_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.request != null) {
          oprot.writeFieldBegin(REQUEST_FIELD_DESC);
          struct.request.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class scan_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public scan_argsTupleScheme getScheme() {
        return new scan_argsTupleScheme();
      }
    }

    private static class scan_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<scan_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, scan_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, scan_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new scan_request();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class scan_result
      implements org.apache.thrift.TBase<scan_result, scan_result._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<scan_result> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("scan_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "success", org.apache.thrift.protocol.TType.STRUCT, (short) 0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new scan_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new scan_resultTupleSchemeFactory();

    public scan_response success; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short) 0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.SUCCESS,
          new org.apache.thrift.meta_data.FieldMetaData(
              "success",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.StructMetaData(
                  org.apache.thrift.protocol.TType.STRUCT, scan_response.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          scan_result.class, metaDataMap);
    }

    public scan_result() {}

    public scan_result(scan_response success) {
      this();
      this.success = success;
    }

    /** Performs a deep copy on <i>other</i>. */
    public scan_result(scan_result other) {
      if (other.isSetSuccess()) {
        this.success = new scan_response(other.success);
      }
    }

    public scan_result deepCopy() {
      return new scan_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public scan_response getSuccess() {
      return this.success;
    }

    public scan_result setSuccess(scan_response success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case SUCCESS:
          if (value == null) {
            unsetSuccess();
          } else {
            setSuccess((scan_response) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case SUCCESS:
          return getSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case SUCCESS:
          return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof scan_result) return this.equals((scan_result) that);
      return false;
    }

    public boolean equals(scan_result that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success)) return false;
        if (!this.success.equals(that.success)) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(scan_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("scan_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class scan_resultStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public scan_resultStandardScheme getScheme() {
        return new scan_resultStandardScheme();
      }
    }

    private static class scan_resultStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<scan_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, scan_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new scan_response();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, scan_result struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class scan_resultTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public scan_resultTupleScheme getScheme() {
        return new scan_resultTupleScheme();
      }
    }

    private static class scan_resultTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<scan_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, scan_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, scan_result struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = new scan_response();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }

  public static class clear_scanner_args
      implements org.apache.thrift.TBase<clear_scanner_args, clear_scanner_args._Fields>,
          java.io.Serializable,
          Cloneable,
          Comparable<clear_scanner_args> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("clear_scanner_args");

    private static final org.apache.thrift.protocol.TField CONTEXT_ID_FIELD_DESC =
        new org.apache.thrift.protocol.TField(
            "context_id", org.apache.thrift.protocol.TType.I64, (short) 1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
        new clear_scanner_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
        new clear_scanner_argsTupleSchemeFactory();

    public long context_id; // required

    /**
     * The set of fields this struct contains, along with convenience methods for finding and
     * manipulating them.
     */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CONTEXT_ID((short) 1, "context_id");

      private static final java.util.Map<java.lang.String, _Fields> byName =
          new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /** Find the _Fields constant that matches fieldId, or null if its not found. */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // CONTEXT_ID
            return CONTEXT_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null)
          throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /** Find the _Fields constant that matches name, or null if its not found. */
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __CONTEXT_ID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData>
        metaDataMap;

    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(
          _Fields.CONTEXT_ID,
          new org.apache.thrift.meta_data.FieldMetaData(
              "context_id",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
          clear_scanner_args.class, metaDataMap);
    }

    public clear_scanner_args() {}

    public clear_scanner_args(long context_id) {
      this();
      this.context_id = context_id;
      setContext_idIsSet(true);
    }

    /** Performs a deep copy on <i>other</i>. */
    public clear_scanner_args(clear_scanner_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.context_id = other.context_id;
    }

    public clear_scanner_args deepCopy() {
      return new clear_scanner_args(this);
    }

    @Override
    public void clear() {
      setContext_idIsSet(false);
      this.context_id = 0;
    }

    public long getContext_id() {
      return this.context_id;
    }

    public clear_scanner_args setContext_id(long context_id) {
      this.context_id = context_id;
      setContext_idIsSet(true);
      return this;
    }

    public void unsetContext_id() {
      __isset_bitfield =
          org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CONTEXT_ID_ISSET_ID);
    }

    /** Returns true if field context_id is set (has been assigned a value) and false otherwise */
    public boolean isSetContext_id() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CONTEXT_ID_ISSET_ID);
    }

    public void setContext_idIsSet(boolean value) {
      __isset_bitfield =
          org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CONTEXT_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, java.lang.Object value) {
      switch (field) {
        case CONTEXT_ID:
          if (value == null) {
            unsetContext_id();
          } else {
            setContext_id((java.lang.Long) value);
          }
          break;
      }
    }

    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
        case CONTEXT_ID:
          return getContext_id();
      }
      throw new java.lang.IllegalStateException();
    }

    /**
     * Returns true if field corresponding to fieldID is set (has been assigned a value) and false
     * otherwise
     */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
        case CONTEXT_ID:
          return isSetContext_id();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null) return false;
      if (that instanceof clear_scanner_args) return this.equals((clear_scanner_args) that);
      return false;
    }

    public boolean equals(clear_scanner_args that) {
      if (that == null) return false;
      if (this == that) return true;

      boolean this_present_context_id = true;
      boolean that_present_context_id = true;
      if (this_present_context_id || that_present_context_id) {
        if (!(this_present_context_id && that_present_context_id)) return false;
        if (this.context_id != that.context_id) return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(context_id);

      return hashCode;
    }

    @Override
    public int compareTo(clear_scanner_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison =
          java.lang.Boolean.valueOf(isSetContext_id()).compareTo(other.isSetContext_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetContext_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.context_id, other.context_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot)
        throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("clear_scanner_args(");
      boolean first = true;

      sb.append("context_id:");
      sb.append(this.context_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in)
        throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and
        // doesn't call the default constructor.
        __isset_bitfield = 0;
        read(
            new org.apache.thrift.protocol.TCompactProtocol(
                new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class clear_scanner_argsStandardSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public clear_scanner_argsStandardScheme getScheme() {
        return new clear_scanner_argsStandardScheme();
      }
    }

    private static class clear_scanner_argsStandardScheme
        extends org.apache.thrift.scheme.StandardScheme<clear_scanner_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, clear_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true) {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
            case 1: // CONTEXT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.context_id = iprot.readI64();
                struct.setContext_idIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate
        // method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, clear_scanner_args struct)
          throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(CONTEXT_ID_FIELD_DESC);
        oprot.writeI64(struct.context_id);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
    }

    private static class clear_scanner_argsTupleSchemeFactory
        implements org.apache.thrift.scheme.SchemeFactory {
      public clear_scanner_argsTupleScheme getScheme() {
        return new clear_scanner_argsTupleScheme();
      }
    }

    private static class clear_scanner_argsTupleScheme
        extends org.apache.thrift.scheme.TupleScheme<clear_scanner_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, clear_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetContext_id()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetContext_id()) {
          oprot.writeI64(struct.context_id);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, clear_scanner_args struct)
          throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot =
            (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.context_id = iprot.readI64();
          struct.setContext_idIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
        org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
              ? STANDARD_SCHEME_FACTORY
              : TUPLE_SCHEME_FACTORY)
          .getScheme();
    }
  }
}
